package concurrencyCookBook.executors;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class FutureTaskDemo extends FutureTask<Integer>{
	private Integer i;
	public FutureTaskDemo(Callable<Integer> callable,Integer i) {
		super(callable);
		this.i=i;
	}

	public Integer getI() {
		return i;
	}

	public void setI(Integer i) {
		this.i = i;
	}

	@Override
	public Integer get() throws InterruptedException, ExecutionException {
		return this.getI();
	}

}
